#pragma once

#include <hv/HttpServer.h>
#include <unordered_map>
#include <functional>
#include <string>
#include "Service.h"

class Server
{
public:
	Server(http_server_t& server);
	void start();

	void registHandle();

private:
	http_server_t& m_server;
	hv::HttpService m_router;
	std::unordered_map<std::string, std::pair<http_method, std::function<int(HttpRequest*, HttpResponse*)>>> m_routers;
	Service m_service;
};

